<?php
class Index extends Controller {
	public function html() {
		$mUser = new User_model();
		$currUser = $mUser->currUser();
		if(!$currUser) header('Location:/auth/login?backurl='.urlencode('/yunying/page/'));
		
		$data = array();
		$tpl = 'yunying/page/index.html';
		
		$page = $this->get('page', 'str', 1);
		$size = 20;
		
		$params = array();
		
		$mArticle = new Article_model();
		$data['article'] = $mArticle->page($page, $size, $params);
		
		$this->display($data, $tpl);
	}
}